#pragma once

// Compiler
#ifdef _MSC_VER
#define ZZZ_COMPILER_MSVC
#endif

#ifdef __MINGW32__
#define ZZZ_COMPILER_MINGW
#endif

#ifdef __CYGWIN__
#define ZZZ_COMPILER_CYGWIN
#endif

#ifdef __GNUC__
#define ZZZ_COMPILER_GCC
#endif

#ifdef __INTEL_COMPILER
#define ZZZ_COMPILER_INTEL
#endif

// OS
#ifdef _WIN32
#define ZZZ_OS_WIN
#endif

#if defined(_WIN64)
#define ZZZ_OS_WIN64
#else
#define ZZZ_OS_WIN32
#endif

#ifdef __linux
#define ZZZ_OS_LINUX
#endif

#ifdef Macintosh
#define ZZZ_OS_MACOS
#endif

#if defined(ZZZ_COMPILER_GCC) || defined(ZZZ_COMPILER_INTEL)
#ifdef __APPLE__
#define ZZZ_OS_MACOS
#endif
#endif

// Architecture
// By GNU C
#ifdef __i386__
#define ZZZ_ARCH_I386
#elif defined(__ia64__)
#define ZZZ_ARCH_I64
#endif

// By MSVC, Intel
#ifdef _M_IX86
#define ZZZ_ARCH_I386
#elif defined(_M_IA64)
#define ZZZ_ARCH_I64
#endif

// By MinGW32
#ifdef _X86_
#define ZZZ_ARCH_I386
#endif

// Debug or Release
#ifdef ZZZ_COMPILER_MSVC
#ifdef _DEBUG
#define ZZZ_DEBUG
#else
#define ZZZ_RELEASE
#endif
#endif

#ifdef ZZZ_COMPILER_GCC
#ifdef NDEBUG
#define ZZZ_RELEASE
#else
#define ZZZ_DEBUG
#endif
#endif
